package com.test.test01.common.base.error;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Title: ErrorEnum.class
 * Description: 系统错误枚举
 * Create DateTime: 2018/6/13 14:57
 *
 * @author houyi
 */
@Getter
@AllArgsConstructor
public enum ErrorEnum {

    UN_KNOWN(2, "服务器开小差了，请稍后再试~"),
    NOT_FOUND(2, "资源不存在"),
    ARG_ERROR(2, "参数绑定错误"),
    NOT_PARAM(2, "参数不得为空"),
    COMMON_BUSINESS_ERROR(2, "业务异常"),
    NOT_SUPPORT_REQUEST_METHOD(2, "不支持的请求方式"),
    NOT_MOBILE(2, "手机号不能为空"),
    PHONE_NUMBER_OCCUPY(2, "手机号已被注册"),
    VERIFICATION_ERROR(2, "手机验证码不正确"),
    VERIFICATION_TIMEOUT(2, "手机验证码超时，请重新发送"),
    NUMBER_DUPLICATION(2, "不能重复提交"),
    STATUS_ERROR(2, "状态类型错误"),
    PARAM_ERROR(2, "参数错误"),
    NOT_INVALID_PHONE(2, "无效的手机号"),
    ERROR_CODE(2, "验证码错误"),
    SEQ_GET_FAILED(2, "序号获取失败"),
    SHOP_HAD_EXIST(2, "商铺已存在"),
    SHOP_USERNAME_HAD_EXIST(2, "商铺用户名已存在"),
    USERNAME_HAD_EXIST(2, "用户名已存在"),
    REQUIRED_PARAM_EMPTY(2, "必填参数为空"),
    PRODUCT_AUCTION_STATUS_ERROR(2, "拍品状态异常"),
    PRODUCT_AUCTION_TIME_ERROR(2, "拍品起拍时间已过, 自动设置为审核失败"),
    SORT_EXIST(2, "该序号已存在"),
    ROLE_NAME_HAD_EXIST(2, "角色名已存在"),
    MENU_NAME_HAD_EXIST(2, "菜单名已存在"),
    LOGIN_INFO_ERROR(2, "用户名或密码错误"),
    PAY_PASSWORD(2, "支付密码错误"),
    ACCOUNT_STATUS_EXCEPTION(2, "账号状态异常"),
    ORDER_STATUS_EXCEPTION(2, "订单状态异常"),
    TOKEN_INVALID(2, "无效的TOKEN"),
    TO_LOGIN(0, "请先登录！"),
    API_PERMISSION_INVALID(2, "没有权限访问接口"),
    MOBILE_IS_ERROR(2, "手机号格式错误"),
    MOBILE_IS_SAME(2,"绑定前后手机号相同"),
    MOBILE_IS_BIND_OTHER(2,"该手机号已经绑定其他账号"),
    CATEGORY_EXIST_CATEGORY(2, "该分类下存在子分类，暂无法清除"),
    CATEGORY_EXIST_PRODUCT(2, "该分类下存在绑定商品，暂无法清除"),
    NEW_PASSWORD_NOT_EQUAL(2, "两次输入的密码不一致，请重新输入!"),
    CATEGORY_BOUND_ATTRIBUTE_EXIST(2, "该分类与属性绑定已存在，请勿重复绑定"),
    CATEGORY_BOUND_ATTRIBUTE_NOT_EXIST(2, "该分类与属性绑定不存在"),
    CATEGORY_BOUND_PRODUCT_EXIST(2, "该分类已绑定商品"),
    BANK_CARD_NO_ERROR(2, "银行卡号有误"),
    ALREADY_BOUND_BANK(2, "已经绑定该银行卡"),
    FILE_EMPTY(2, "文件为空"),
    NOT_MATCH_PAY_NO(2, "交易号未匹配到支付订单号"),
    NOT_PAY_NO(2, "不存在的支付订单"),
    NOT_REFUND_NO(2, "不存在的退款订单"),
    PRODUCT_STOCK_NOT_ENOUGH(2, "该商品库存不足"),
    PRODUCT_OFF_THE_SHELF(2, "该商品已下架"),
    ADDRESS_NOT_NULL(2, "请填写收货地址"),
    CUSTOMER_USER_BALANCE_NOT_ENOUGH(2, "余额不足"),
    NOT_EXIST_ORDER(2, "不存在的订单"),
    ORDER_REFUND_END(2, "请勿重复提交退款"),
    ORDER_RETURN_END(2, "请勿重复提交退货"),
    NOT_REJECT(2, "该订单已审核通过,不可驳回"),
    ORDER_PAY_END_NOT_CANCEL(2, "该订单已支付,不可取消"),
    ORDER_REFUND_CHECK_END_OR_TURN_DOWN(2, "该订单已驳回"),
    PRODUCT_NOT_EXIST(2, "该商品已下架"),
    PRODUCT_NOT_REDUCE(2, "宝贝不能再减少了"),
    PRODUCT_AUCTION_ALLREADY_START(2, "商品已经开始拍卖"),
    NOT_EXIST_PRODUCT_AUCTION(2, "不存在的拍卖商品"),
    PARENT_NOT_EQUALS_TO_SON_BY_CATEGORY(2, "父类和子类类型不同"),
    OREER_LOGISTICS_NOT_EXIST(2, "订单物流信息不存在"),
    REFUND_PRICE_NOT_MIN(2, "退款金额不可小于0"),
    REFUND_PRICE_NOT_MAX(2, "退款金额不得大于订单金额"),
    REFUND_NOT_EXIST(2, "退货单号不存在"),
    RPC_REQUEST_FAILED(2, "RPC调用失败"),
    MEDIA_URL_NOE_EXIST(2, "文件路径为空"),
    DEFINITE_TIME_NOT_EXIST(2, "定时时间未设定"),
    IDENTITYNUMBER_ERROR(2, "身份证格式不正确"),
    MAILBOX_ERROR(2, "邮箱格式错误"),
    NOT_EXIST_ORDER_RETURN(2, "不存在的退货订单"),

    ;


    /**
     * 错误名称
     */
    private int code;

    /**
     * 错误描述
     */
    private String errorDescription;


}
